package com.c0o0.role.action;

import javax.persistence.EntityManager;
import javax.persistence.Query;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.c0o0.core.dao.EMF;
import com.opensymphony.xwork2.ActionSupport;

@Component
@Scope("prototype")
public class RoleAction extends ActionSupport {

	private static final long serialVersionUID = 6060127723863273697L;

	public String f() {
		// PersistenceManager pm = PMF.get().getPersistenceManager();
		// Role r = new Role();
		// r.setCreateDate(new Date());
		// r.setName("admin");
		// pm.makePersistent(r);
		
		  EntityManager em = EMF.get().createEntityManager();
		  Query q=  em.createQuery("");
		  q.getResultList();
		return INPUT;
	}
}
